﻿
@{
    ViewBag.Title = "ParList";
}
@using YouWei.Infrastructure.Entity;
@using YouWei.Utility;
@model  List<GroupComment>

@if (Model.Count <= 0)
{
    <div class="no-data" id="nodata">
        <div class="img-box"></div>
        <div class="text">暂无数据</div>
    </div>
}
else
{
    <table class="table table-bordered table-hover body-table-head">
        <thead>
            <tr>
                <th>
                    内容ID
                </th>
                <th>
                    简介
                </th>
                <th>
                    文章所属模块
                </th>
                <th style="max-width:250px;width:250px">
                    文章链接
                </th>
                <th>
                    是否可见
                </th>
                @*<th>
                        来源内容ID
                    </th>*@
                <th>
                    创建时间
                </th>
                <th class="t_c">
                    操作
                </th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model)
            {
                <tr>
                    <td class="title">@item.GroupCommentID</td>
                    <td>@item.CommentDesc</td>
                    @if (item.CommentSection == 1)
                    {
                        <td>随笔</td>
                    }
                    else if (item.CommentSection == 2)
                    {
                        <td>游记</td>
                    }
                    else if (item.CommentSection == 3)
                    {
                        <td>求助</td>
                    }
                    else if (item.CommentSection == 4)
                    {
                        <td>心情</td>
                    }
                    else
                    {
                        <td>心情</td>
                    }
                    <td style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;max-width:250px;width:250px;">@item.CommentLink</td>
                    @if (item.IsShow == 1)
                    {
                        <td>是</td>
                    }
                    else
                    {
                        <td>否</td>
                    }
                    @*<td><a href="@Url.Action("GroupCommentInfo","GroupComment")?id=@item.SourceID">@item.SourceID</a></td>*@
                    <td> @item.CreateDate.ToString("yyyy-MM-dd HH:mm")</td>
                    <td>
                        <button type="button" class="btn btn-info btn-xs" onclick="detail('@item.GroupCommentID')">详情</button>
                        <button type="button" class="btn btn-info btn-xs" onclick="del('@item.GroupCommentID')">删除</button>
                    </td>
                </tr>
            }
        </tbody>
    </table>
    <input type="hidden" id="total" value="@ViewBag.Total" />
}





